package com.huike.controller;

import com.huike.log.Log;
import com.huike.result.Result;
import com.huike.service.impl.CaptchaServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/veri")
public class CaptchaController {

    @Autowired
    private CaptchaServiceImpl captchaService;
    @Log(title = "登录模块")
    @GetMapping("/code")
    public Result getCaptcha()  {
        String base64Image = captchaService.generateCaptcha();
        // ... 输出验证码图片到响应
        System.out.println(base64Image);
        return Result.success(base64Image);
    }



}